import tabbarItems from '../../common/datas/tabbaritem.js';
import router from '@system.router';

export default {
    data: {
        tabbarItems
    },
    props: {
        index: {
            type: Number,
            default() {
                return 0;
            }
        }
    },
    jump(index) {
        switch(index) {
            case 0:
                router.push({
                    uri: "pages/home/index",
                    params: {
                        info: "这是路由传递的参数"
                    }
                });
                break;
            case 1:
                router.push({
                    uri: "pages/data/index",
                    params: {
                        info: "这是路由传递的参数"
                    }
                });
                break;
            case 2:
                router.push({
                    uri: "pages/report/index",
                    params: {
                        info: "这是路由传递的参数"
                    }
                });
                break;
            case 3:
                router.push({
                    uri: "pages/my/index",
                    params: {
                        info: "这是路由传递的参数"
                    }
                });
                break;
        }
    }
}